.class public Lcom/netease/newsreader/weibo/WeiboLogin;
.super Lcom/netease/newsreader/activity/BaseActivity;
.source "WeiboLogin.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/weibo/WeiboLogin$WebHandler;
    }
.end annotation


# static fields
.field private static final ACTION_FAILED:I = 0x2

.field private static final ACTION_PROCCESSED:I = 0x0

.field private static final ACTION_UNPROCCESS:I = 0x1

.field public static final PARAM_WEIBO_TYPE:I = -0x1

.field public static final PARAM_WEIBO_TYPE_EMAIL:I = 0x6

.field public static final PARAM_WEIBO_TYPE_NETEASE:I = 0x2

.field public static final PARAM_WEIBO_TYPE_QQ:I = 0x1

.field public static final PARAM_WEIBO_TYPE_RENREN:I = 0x3

.field public static final PARAM_WEIBO_TYPE_SINA:I = 0x0

.field public static final PARAM_WEIBO_TYPE_SMS:I = 0x5

.field public static final PARAM_WEIBO_TYPE_YDNOTE:I = 0x4

.field public static RENREN_API_KEY:Ljava/lang/String; = null

.field public static RENREN_APP_ID:Ljava/lang/String; = null

.field public static RENREN_SECRET_KEY:Ljava/lang/String; = null

.field public static final callbackUrl:Ljava/lang/String; = "weibo4andriod://AccountSettingActivity"

.field public static final callbackUrlPrefix:Ljava/lang/String; = "weibo4andriod"

.field public static final neteaseCustomKey:Ljava/lang/String; = "zK8tVL3Nj4JOgqFL"

.field public static final neteaseCustomSecrect:Ljava/lang/String; = "l6Kkp4nszxRx3OBndw7C8ZRjthvzTqEv"

.field public static final qqCustomKey:Ljava/lang/String; = "2ffe39c660f146df91ffb206a9d44bd5"

.field public static final qqCustomSecrect:Ljava/lang/String; = "63261cea4dc8b5c74ed5eefc0f149acd"

.field public static final sinaCustomKey:Ljava/lang/String; = "3857427664"

.field public static final sinaCustomSecrect:Ljava/lang/String; = "1901a3e5e35c98953ef4df53095ae02f"

.field private static tokenKey:Ljava/lang/String;

.field private static tokenSecrect:Ljava/lang/String;


# instance fields
.field private handler:Landroid/os/Handler;

.field private loadingbar:Landroid/widget/LinearLayout;

.field private mRenren:Lcom/renren/api/connect/android/Renren;

.field private neteaserequestToken:Lt4j/http/RequestToken;

.field private progressDialog:Landroid/app/ProgressDialog;

.field private reqeustToken:Ljava/lang/String;

.field private reqeustsceset:Ljava/lang/String;

.field private title:Landroid/widget/TextView;

.field private top_image:Landroid/widget/ImageView;

.field private webView:Landroid/webkit/WebView;

.field private weibo_type:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 51
    const-string v0, ""

    sput-object v0, Lcom/netease/newsreader/weibo/WeiboLogin;->tokenKey:Ljava/lang/String;

    .line 52
    const-string v0, ""

    sput-object v0, Lcom/netease/newsreader/weibo/WeiboLogin;->tokenSecrect:Ljava/lang/String;

    .line 76
    const-string v0, "b7f53f3f6873425d88d8047b2d42d041"

    sput-object v0, Lcom/netease/newsreader/weibo/WeiboLogin;->RENREN_API_KEY:Ljava/lang/String;

    .line 77
    const-string v0, "6ae2193b45fe41cd9c13ed2a36cc1e9a"

    sput-object v0, Lcom/netease/newsreader/weibo/WeiboLogin;->RENREN_SECRET_KEY:Ljava/lang/String;

    .line 78
    const-string v0, "155516"

    sput-object v0, Lcom/netease/newsreader/weibo/WeiboLogin;->RENREN_APP_ID:Ljava/lang/String;

    .line 47
    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 47
    invoke-direct {p0}, Lcom/netease/newsreader/activity/BaseActivity;-><init>()V

    .line 53
    const/4 v0, -0x1

    iput v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    .line 56
    iput-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->neteaserequestToken:Lt4j/http/RequestToken;

    .line 533
    new-instance v0, Lcom/netease/newsreader/weibo/WeiboLogin$1;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$1;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    iput-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    .line 679
    iput-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustToken:Ljava/lang/String;

    .line 680
    iput-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustsceset:Ljava/lang/String;

    .line 47
    return-void
.end method

.method private ActionProcess(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 5
    .parameter "view"
    .parameter "url"

    .prologue
    const/16 v4, 0x8

    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 285
    invoke-direct {p0, p2}, Lcom/netease/newsreader/weibo/WeiboLogin;->checkUrl(Ljava/lang/String;)I

    move-result v3

    packed-switch v3, :pswitch_data_0

    :pswitch_0
    move v1, v2

    .line 307
    :goto_0
    return v1

    .line 288
    :pswitch_1
    new-instance v0, Landroid/content/Intent;

    const-class v3, Lcom/netease/newsreader/activity/AccountSettingActivity;

    invoke-direct {v0, p0, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 289
    .local v0, intent:Landroid/content/Intent;
    invoke-virtual {p0, v2, v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->setResult(ILandroid/content/Intent;)V

    .line 290
    invoke-virtual {p1}, Landroid/webkit/WebView;->stopLoading()V

    .line 291
    iget-object v2, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->loadingbar:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0

    .line 296
    .end local v0           #intent:Landroid/content/Intent;
    :pswitch_2
    invoke-static {p2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/netease/newsreader/weibo/WeiboLogin;->storeAccessInfo(Landroid/net/Uri;)V

    .line 297
    new-instance v0, Landroid/content/Intent;

    const-class v2, Lcom/netease/newsreader/activity/AccountSettingActivity;

    invoke-direct {v0, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 298
    .restart local v0       #intent:Landroid/content/Intent;
    const/4 v2, -0x1

    invoke-virtual {p0, v2, v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->setResult(ILandroid/content/Intent;)V

    .line 300
    invoke-virtual {p1}, Landroid/webkit/WebView;->stopLoading()V

    .line 301
    iget-object v2, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->loadingbar:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0

    .line 285
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_2
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method static synthetic access$0(Lcom/netease/newsreader/weibo/WeiboLogin;)Landroid/app/ProgressDialog;
    .locals 1
    .parameter

    .prologue
    .line 84
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->progressDialog:Landroid/app/ProgressDialog;

    return-object v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/weibo/WeiboLogin;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 679
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustToken:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$10(Lcom/netease/newsreader/weibo/WeiboLogin;)V
    .locals 0
    .parameter

    .prologue
    .line 649
    invoke-direct {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->renrenLogin()V

    return-void
.end method

.method static synthetic access$11(Lcom/netease/newsreader/weibo/WeiboLogin;)V
    .locals 0
    .parameter

    .prologue
    .line 663
    invoke-direct {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->ydnoteLogin()V

    return-void
.end method

.method static synthetic access$2(Lcom/netease/newsreader/weibo/WeiboLogin;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 680
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustsceset:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$3(Lcom/netease/newsreader/weibo/WeiboLogin;)Landroid/os/Handler;
    .locals 1
    .parameter

    .prologue
    .line 533
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$4(Lcom/netease/newsreader/weibo/WeiboLogin;)Landroid/widget/LinearLayout;
    .locals 1
    .parameter

    .prologue
    .line 54
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->loadingbar:Landroid/widget/LinearLayout;

    return-object v0
.end method

.method static synthetic access$5(Lcom/netease/newsreader/weibo/WeiboLogin;Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 283
    invoke-direct {p0, p1, p2}, Lcom/netease/newsreader/weibo/WeiboLogin;->ActionProcess(Landroid/webkit/WebView;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method static synthetic access$6(Lcom/netease/newsreader/weibo/WeiboLogin;)I
    .locals 1
    .parameter

    .prologue
    .line 53
    iget v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    return v0
.end method

.method static synthetic access$7(Lcom/netease/newsreader/weibo/WeiboLogin;)V
    .locals 0
    .parameter

    .prologue
    .line 560
    invoke-direct {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->sinaWeiboLogin()V

    return-void
.end method

.method static synthetic access$8(Lcom/netease/newsreader/weibo/WeiboLogin;)V
    .locals 0
    .parameter

    .prologue
    .line 587
    invoke-direct {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->qqWeiboLogin()V

    return-void
.end method

.method static synthetic access$9(Lcom/netease/newsreader/weibo/WeiboLogin;)V
    .locals 0
    .parameter

    .prologue
    .line 609
    invoke-direct {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->neteaseWeiboLogin()V

    return-void
.end method

.method private checkUrl(Ljava/lang/String;)I
    .locals 5
    .parameter "url"

    .prologue
    const/4 v2, 0x2

    const/4 v3, 0x0

    .line 512
    const-string v4, "http://graph.renren.com/login_deny/"

    invoke-virtual {p1, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 531
    :cond_0
    :goto_0
    return v2

    .line 514
    :cond_1
    const-string v4, "close:"

    invoke-virtual {p1, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_2

    move v2, v3

    .line 515
    goto :goto_0

    .line 516
    :cond_2
    const-string v4, "http://graph.renren.com/oauth/login_success.html"

    invoke-virtual {p1, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 517
    invoke-static {p1}, Lcom/renren/api/connect/android/Util;->parseUrl(Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v1

    .line 518
    .local v1, values:Landroid/os/Bundle;
    const-string v4, "error"

    invoke-virtual {v1, v4}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 519
    .local v0, error:Ljava/lang/String;
    if-nez v0, :cond_0

    move v2, v3

    .line 522
    goto :goto_0

    .line 525
    .end local v0           #error:Ljava/lang/String;
    .end local v1           #values:Landroid/os/Bundle;
    :cond_3
    const-string v2, "weibo4andriod"

    invoke-virtual {p1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_4

    move v2, v3

    .line 526
    goto :goto_0

    .line 527
    :cond_4
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {}, Lcom/netease/newsreader/weibo/YdNoteLoginHelper;->getBaseUrl()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "oauth/"

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v4, "weibo4andriod"

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_5

    .line 528
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {}, Lcom/netease/newsreader/weibo/YdNoteLoginHelper;->getBaseUrl()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "oauth/"

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    invoke-virtual {p1, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v2

    const-string v4, "weibo4andriod"

    invoke-virtual {v2, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_5

    move v2, v3

    .line 529
    goto :goto_0

    .line 531
    :cond_5
    const/4 v2, 0x1

    goto :goto_0
.end method

.method public static getQQToken()Ljava/lang/String;
    .locals 1

    .prologue
    .line 774
    sget-object v0, Lcom/netease/newsreader/weibo/WeiboLogin;->tokenKey:Ljava/lang/String;

    return-object v0
.end method

.method public static getQQTokenSecret()Ljava/lang/String;
    .locals 1

    .prologue
    .line 778
    sget-object v0, Lcom/netease/newsreader/weibo/WeiboLogin;->tokenSecrect:Ljava/lang/String;

    return-object v0
.end method

.method private neteaseWeiboLogin()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 612
    :try_start_0
    const-string v4, "tblog4j.oauth.consumerKey"

    const-string v5, "zK8tVL3Nj4JOgqFL"

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 613
    const-string v4, "tblog4j.oauth.consumerSecret"

    const-string v5, "l6Kkp4nszxRx3OBndw7C8ZRjthvzTqEv"

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 614
    const-string v4, "tblog4j.debug"

    const-string v5, "false"

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 615
    new-instance v2, Lt4j/TBlog;

    invoke-direct {v2}, Lt4j/TBlog;-><init>()V

    .line 617
    .local v2, tblog:Lt4j/TBlog;
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 618
    const-string v4, "10.0.0.172"

    const/16 v5, 0x50

    invoke-virtual {v2, v4, v5}, Lt4j/TBlog;->setHttpProxy(Ljava/lang/String;I)V

    .line 621
    :cond_0
    invoke-virtual {v2}, Lt4j/TBlog;->getOAuthRequestToken()Lt4j/http/RequestToken;

    move-result-object v4

    iput-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->neteaserequestToken:Lt4j/http/RequestToken;

    .line 622
    new-instance v4, Ljava/lang/StringBuilder;

    iget-object v5, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->neteaserequestToken:Lt4j/http/RequestToken;

    invoke-virtual {v5}, Lt4j/http/RequestToken;->getAuthenticationURL()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, "&oauth_callback="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "&client_type=mobile"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 623
    .local v3, uri:Landroid/net/Uri;
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V
    :try_end_0
    .catch Lt4j/TBlogException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2

    .line 647
    .end local v2           #tblog:Lt4j/TBlog;
    .end local v3           #uri:Landroid/net/Uri;
    :goto_0
    return-void

    .line 624
    :catch_0
    move-exception v0

    .line 626
    .local v0, e:Lt4j/TBlogException;
    invoke-virtual {v0}, Lt4j/TBlogException;->printStackTrace()V

    .line 628
    :try_start_1
    new-instance v2, Lt4j/TBlog;

    invoke-direct {v2}, Lt4j/TBlog;-><init>()V

    .line 630
    .restart local v2       #tblog:Lt4j/TBlog;
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 631
    const-string v4, "10.0.0.172"

    const/16 v5, 0x50

    invoke-virtual {v2, v4, v5}, Lt4j/TBlog;->setHttpProxy(Ljava/lang/String;I)V

    .line 634
    :cond_1
    invoke-virtual {v2}, Lt4j/TBlog;->getOAuthRequestToken()Lt4j/http/RequestToken;

    move-result-object v4

    iput-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->neteaserequestToken:Lt4j/http/RequestToken;

    .line 635
    new-instance v4, Ljava/lang/StringBuilder;

    iget-object v5, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->neteaserequestToken:Lt4j/http/RequestToken;

    invoke-virtual {v5}, Lt4j/http/RequestToken;->getAuthenticationURL()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, "&oauth_callback="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "&client_type=mobile"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 636
    .restart local v3       #uri:Landroid/net/Uri;
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V
    :try_end_1
    .catch Lt4j/TBlogException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_0

    .line 637
    .end local v2           #tblog:Lt4j/TBlog;
    .end local v3           #uri:Landroid/net/Uri;
    :catch_1
    move-exception v1

    .line 639
    .local v1, e1:Lt4j/TBlogException;
    invoke-virtual {v1}, Lt4j/TBlogException;->printStackTrace()V

    .line 640
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    invoke-virtual {v4, v6}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0

    .line 643
    .end local v0           #e:Lt4j/TBlogException;
    .end local v1           #e1:Lt4j/TBlogException;
    :catch_2
    move-exception v0

    .line 644
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 645
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    invoke-virtual {v4, v6}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0
.end method

.method static parseToken(Ljava/lang/String;)Z
    .locals 9
    .parameter "response"

    .prologue
    const/4 v8, 0x2

    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 745
    if-eqz p0, :cond_0

    const-string v7, ""

    invoke-virtual {p0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 770
    :cond_0
    :goto_0
    return v5

    .line 749
    :cond_1
    const-string v7, "&"

    invoke-virtual {p0, v7}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v4

    .line 751
    .local v4, tokenArray:[Ljava/lang/String;
    array-length v7, v4

    if-lt v7, v8, :cond_0

    .line 755
    aget-object v0, v4, v5

    .line 756
    .local v0, strTokenKey:Ljava/lang/String;
    aget-object v1, v4, v6

    .line 758
    .local v1, strTokenSecrect:Ljava/lang/String;
    const-string v7, "="

    invoke-virtual {v0, v7}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    .line 759
    .local v2, token1:[Ljava/lang/String;
    array-length v7, v2

    if-lt v7, v8, :cond_0

    .line 762
    aget-object v7, v2, v6

    sput-object v7, Lcom/netease/newsreader/weibo/WeiboLogin;->tokenKey:Ljava/lang/String;

    .line 764
    const-string v7, "="

    invoke-virtual {v1, v7}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    .line 765
    .local v3, token2:[Ljava/lang/String;
    array-length v7, v3

    if-lt v7, v8, :cond_0

    .line 768
    aget-object v5, v3, v6

    sput-object v5, Lcom/netease/newsreader/weibo/WeiboLogin;->tokenSecrect:Ljava/lang/String;

    move v5, v6

    .line 770
    goto :goto_0
.end method

.method private qqWeiboLogin()V
    .locals 8

    .prologue
    const/4 v7, 0x0

    .line 588
    new-instance v0, Lcom/netease/newsreader/weibo/QWeiboSyncApi;

    invoke-direct {v0}, Lcom/netease/newsreader/weibo/QWeiboSyncApi;-><init>()V

    .line 589
    .local v0, api:Lcom/netease/newsreader/weibo/QWeiboSyncApi;
    const/4 v2, 0x0

    .line 592
    .local v2, response:Ljava/lang/String;
    :try_start_0
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 593
    const-string v4, "10.0.0.172"

    const/16 v5, 0x50

    invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Lcom/netease/newsreader/util/Tools;->setHttpProxy(Ljava/lang/String;Ljava/lang/String;)V

    .line 595
    :cond_0
    const-string v4, "2ffe39c660f146df91ffb206a9d44bd5"

    const-string v5, "63261cea4dc8b5c74ed5eefc0f149acd"

    const-string v6, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {v0, v4, v5, v6}, Lcom/netease/newsreader/weibo/QWeiboSyncApi;->getRequestToken(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 596
    invoke-static {v2}, Lcom/netease/newsreader/weibo/WeiboLogin;->parseToken(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_1

    .line 597
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v5, 0x0

    invoke-virtual {v4, v5}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 607
    :goto_0
    return-void

    .line 599
    :cond_1
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "http://open.t.qq.com/cgi-bin/authorize?oauth_token="

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v5, Lcom/netease/newsreader/weibo/WeiboLogin;->tokenKey:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 600
    .local v3, uri:Landroid/net/Uri;
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 602
    .end local v3           #uri:Landroid/net/Uri;
    :catch_0
    move-exception v1

    .line 603
    .local v1, e:Ljava/lang/Exception;
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    .line 604
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    invoke-virtual {v4, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0
.end method

.method private renrenLogin()V
    .locals 8

    .prologue
    .line 651
    :try_start_0
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 652
    const-string v0, "10.0.0.172"

    const/16 v1, 0x50

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/netease/newsreader/util/Tools;->setHttpProxy(Ljava/lang/String;Ljava/lang/String;)V

    .line 655
    :cond_0
    const/4 v2, 0x0

    const-string v3, "http://graph.renren.com/oauth/login_success.html"

    const-string v4, "token"

    sget-object v5, Lcom/netease/newsreader/weibo/WeiboLogin;->RENREN_API_KEY:Ljava/lang/String;

    move-object v0, p0

    move-object v1, p0

    invoke-virtual/range {v0 .. v5}, Lcom/netease/newsreader/weibo/WeiboLogin;->getRenrenAuthorizeUrl(Landroid/app/Activity;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v7

    .line 656
    .local v7, uri:Landroid/net/Uri;
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v7}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 661
    .end local v7           #uri:Landroid/net/Uri;
    :goto_0
    return-void

    .line 657
    :catch_0
    move-exception v6

    .line 658
    .local v6, e:Ljava/lang/Exception;
    invoke-virtual {v6}, Ljava/lang/Exception;->printStackTrace()V

    .line 659
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0
.end method

.method private sinaWeiboLogin()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 561
    const-string v4, "3857427664"

    sput-object v4, Lweibo4android/Weibo;->CONSUMER_KEY:Ljava/lang/String;

    .line 562
    const-string v4, "1901a3e5e35c98953ef4df53095ae02f"

    sput-object v4, Lweibo4android/Weibo;->CONSUMER_SECRET:Ljava/lang/String;

    .line 563
    const-string v4, "weibo4j.oauth.consumerKey"

    sget-object v5, Lweibo4android/Weibo;->CONSUMER_KEY:Ljava/lang/String;

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 564
    const-string v4, "weibo4j.oauth.consumerSecret"

    sget-object v5, Lweibo4android/Weibo;->CONSUMER_SECRET:Ljava/lang/String;

    invoke-static {v4, v5}, Ljava/lang/System;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 565
    new-instance v3, Lweibo4android/Weibo;

    invoke-direct {v3}, Lweibo4android/Weibo;-><init>()V

    .line 567
    .local v3, weibo:Lweibo4android/Weibo;
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 568
    const-string v4, "10.0.0.172"

    const/16 v5, 0x50

    invoke-virtual {v3, v4, v5}, Lweibo4android/Weibo;->setHttpProxy(Ljava/lang/String;I)V

    .line 573
    :cond_0
    :try_start_0
    const-string v4, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {v3, v4}, Lweibo4android/Weibo;->getOAuthRequestToken(Ljava/lang/String;)Lweibo4android/http/RequestToken;

    move-result-object v1

    .line 574
    .local v1, requestToken:Lweibo4android/http/RequestToken;
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Lweibo4android/http/RequestToken;->getAuthenticationURL()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, "&oauth_callback="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    .line 575
    .local v2, uri:Landroid/net/Uri;
    invoke-static {}, Lcom/netease/newsreader/weibo/OAuthConstant;->getInstance()Lcom/netease/newsreader/weibo/OAuthConstant;

    move-result-object v4

    invoke-virtual {v4, v1}, Lcom/netease/newsreader/weibo/OAuthConstant;->setRequestToken(Lweibo4android/http/RequestToken;)V

    .line 577
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v2}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V
    :try_end_0
    .catch Lweibo4android/WeiboException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 585
    .end local v1           #requestToken:Lweibo4android/http/RequestToken;
    .end local v2           #uri:Landroid/net/Uri;
    :goto_0
    return-void

    .line 578
    :catch_0
    move-exception v0

    .line 579
    .local v0, e:Lweibo4android/WeiboException;
    invoke-virtual {v0}, Lweibo4android/WeiboException;->printStackTrace()V

    .line 580
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    invoke-virtual {v4, v6}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0

    .line 581
    .end local v0           #e:Lweibo4android/WeiboException;
    :catch_1
    move-exception v0

    .line 582
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 583
    iget-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    invoke-virtual {v4, v6}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0
.end method

.method private storeAccessInfo(Landroid/net/Uri;)V
    .locals 29
    .parameter "uri"

    .prologue
    .line 315
    move-object/from16 v0, p0

    iget v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    packed-switch v6, :pswitch_data_0

    .line 505
    :goto_0
    return-void

    .line 320
    :pswitch_0
    :try_start_0
    invoke-static {}, Lcom/netease/newsreader/weibo/OAuthConstant;->getInstance()Lcom/netease/newsreader/weibo/OAuthConstant;

    move-result-object v6

    invoke-virtual {v6}, Lcom/netease/newsreader/weibo/OAuthConstant;->getRequestToken()Lweibo4android/http/RequestToken;

    move-result-object v14

    .line 321
    .local v14, requestToken:Lweibo4android/http/RequestToken;
    const-string v6, "oauth_verifier"

    move-object/from16 v0, p1

    invoke-virtual {v0, v6}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v14, v6}, Lweibo4android/http/RequestToken;->getAccessToken(Ljava/lang/String;)Lweibo4android/http/AccessToken;

    move-result-object v9

    .line 323
    .local v9, accessToken:Lweibo4android/http/AccessToken;
    if-eqz v9, :cond_0

    invoke-virtual {v9}, Lweibo4android/http/AccessToken;->getToken()Ljava/lang/String;

    move-result-object v6

    if-eqz v6, :cond_0

    invoke-virtual {v9}, Lweibo4android/http/AccessToken;->getToken()Ljava/lang/String;

    move-result-object v6

    const-string v7, ""

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_1

    .line 324
    :cond_0
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 339
    .end local v9           #accessToken:Lweibo4android/http/AccessToken;
    .end local v14           #requestToken:Lweibo4android/http/RequestToken;
    :catch_0
    move-exception v10

    .line 340
    .local v10, e:Ljava/lang/Exception;
    invoke-virtual {v10}, Ljava/lang/Exception;->printStackTrace()V

    .line 341
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0

    .line 327
    .end local v10           #e:Ljava/lang/Exception;
    .restart local v9       #accessToken:Lweibo4android/http/AccessToken;
    .restart local v14       #requestToken:Lweibo4android/http/RequestToken;
    :cond_1
    :try_start_1
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "delete from oauth_list where oauth_type=\'sina\'"

    invoke-virtual {v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 330
    new-instance v11, Landroid/content/ContentValues;

    invoke-direct {v11}, Landroid/content/ContentValues;-><init>()V

    .line 331
    .local v11, initialValues:Landroid/content/ContentValues;
    const-string v6, "oauth_type"

    const-string v7, "sina"

    invoke-virtual {v11, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 332
    const-string v6, "oauth_token"

    invoke-virtual {v9}, Lweibo4android/http/AccessToken;->getToken()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v11, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 333
    const-string v6, "oauth_token_secret"

    invoke-virtual {v9}, Lweibo4android/http/AccessToken;->getTokenSecret()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v11, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 334
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "oauth_list"

    const/4 v8, 0x0

    invoke-virtual {v6, v7, v8, v11}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J

    .line 336
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x1

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 350
    .end local v9           #accessToken:Lweibo4android/http/AccessToken;
    .end local v11           #initialValues:Landroid/content/ContentValues;
    .end local v14           #requestToken:Lweibo4android/http/RequestToken;
    :pswitch_1
    new-instance v3, Lcom/netease/newsreader/weibo/QWeiboSyncApi;

    invoke-direct {v3}, Lcom/netease/newsreader/weibo/QWeiboSyncApi;-><init>()V

    .line 351
    .local v3, api:Lcom/netease/newsreader/weibo/QWeiboSyncApi;
    const/4 v15, 0x0

    .line 352
    .local v15, response:Ljava/lang/String;
    const-string v4, "2ffe39c660f146df91ffb206a9d44bd5"

    .line 353
    .local v4, customKey:Ljava/lang/String;
    const-string v5, "63261cea4dc8b5c74ed5eefc0f149acd"

    .line 354
    .local v5, customSecrect:Ljava/lang/String;
    invoke-static {}, Lcom/netease/newsreader/weibo/WeiboLogin;->getQQToken()Ljava/lang/String;

    move-result-object v6

    invoke-static {}, Lcom/netease/newsreader/weibo/WeiboLogin;->getQQTokenSecret()Ljava/lang/String;

    move-result-object v7

    const-string v8, "oauth_verifier"

    move-object/from16 v0, p1

    invoke-virtual {v0, v8}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual/range {v3 .. v8}, Lcom/netease/newsreader/weibo/QWeiboSyncApi;->getAccessToken(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v15

    .line 357
    const-string v24, ""

    .line 358
    .local v24, tokenKey:Ljava/lang/String;
    const-string v25, ""

    .line 359
    .local v25, tokenSecrect:Ljava/lang/String;
    const-string v12, ""

    .line 360
    .local v12, name:Ljava/lang/String;
    const/16 v16, 0x1

    .line 361
    .local v16, status:Z
    if-eqz v15, :cond_2

    const-string v6, ""

    invoke-virtual {v15, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_3

    .line 362
    :cond_2
    const/16 v16, 0x0

    .line 398
    :goto_1
    if-nez v16, :cond_8

    .line 399
    const/16 v16, 0x1

    .line 400
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    .line 364
    :cond_3
    const-string v6, "&"

    invoke-virtual {v15, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v23

    .line 366
    .local v23, tokenArray:[Ljava/lang/String;
    move-object/from16 v0, v23

    array-length v6, v0

    const/4 v7, 0x2

    if-ge v6, v7, :cond_4

    .line 367
    const/16 v16, 0x0

    goto :goto_1

    .line 369
    :cond_4
    const/4 v6, 0x0

    aget-object v18, v23, v6

    .line 370
    .local v18, strTokenKey:Ljava/lang/String;
    const/4 v6, 0x1

    aget-object v19, v23, v6

    .line 371
    .local v19, strTokenSecrect:Ljava/lang/String;
    const-string v17, ""

    .line 372
    .local v17, strName:Ljava/lang/String;
    move-object/from16 v0, v23

    array-length v6, v0

    const/4 v7, 0x2

    if-le v6, v7, :cond_5

    .line 373
    const/4 v6, 0x2

    aget-object v17, v23, v6

    .line 374
    const-string v6, "="

    move-object/from16 v0, v17

    invoke-virtual {v0, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v13

    .line 375
    .local v13, names:[Ljava/lang/String;
    array-length v6, v13

    const/4 v7, 0x2

    if-lt v6, v7, :cond_5

    .line 376
    const/4 v6, 0x1

    aget-object v12, v13, v6

    .line 380
    .end local v13           #names:[Ljava/lang/String;
    :cond_5
    const-string v6, "="

    move-object/from16 v0, v18

    invoke-virtual {v0, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v21

    .line 381
    .local v21, token1:[Ljava/lang/String;
    move-object/from16 v0, v21

    array-length v6, v0

    const/4 v7, 0x2

    if-ge v6, v7, :cond_6

    .line 382
    const/16 v16, 0x0

    goto :goto_1

    .line 384
    :cond_6
    const/4 v6, 0x1

    aget-object v24, v21, v6

    .line 386
    const-string v6, "="

    move-object/from16 v0, v19

    invoke-virtual {v0, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v22

    .line 387
    .local v22, token2:[Ljava/lang/String;
    move-object/from16 v0, v22

    array-length v6, v0

    const/4 v7, 0x2

    if-ge v6, v7, :cond_7

    .line 388
    const/16 v16, 0x0

    goto :goto_1

    .line 390
    :cond_7
    const/4 v6, 0x1

    aget-object v25, v22, v6

    goto :goto_1

    .line 403
    .end local v17           #strName:Ljava/lang/String;
    .end local v18           #strTokenKey:Ljava/lang/String;
    .end local v19           #strTokenSecrect:Ljava/lang/String;
    .end local v21           #token1:[Ljava/lang/String;
    .end local v22           #token2:[Ljava/lang/String;
    .end local v23           #tokenArray:[Ljava/lang/String;
    :cond_8
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "delete from oauth_list where oauth_type=\'qq\'"

    invoke-virtual {v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 406
    new-instance v11, Landroid/content/ContentValues;

    invoke-direct {v11}, Landroid/content/ContentValues;-><init>()V

    .line 407
    .restart local v11       #initialValues:Landroid/content/ContentValues;
    const-string v6, "oauth_type"

    const-string v7, "qq"

    invoke-virtual {v11, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 408
    const-string v6, "oauth_token"

    move-object/from16 v0, v24

    invoke-virtual {v11, v6, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 409
    const-string v6, "oauth_token_secret"

    move-object/from16 v0, v25

    invoke-virtual {v11, v6, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 410
    const-string v6, "oauth_name"

    invoke-virtual {v11, v6, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 411
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "oauth_list"

    const/4 v8, 0x0

    invoke-virtual {v6, v7, v8, v11}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J

    .line 414
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x1

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    .line 422
    .end local v3           #api:Lcom/netease/newsreader/weibo/QWeiboSyncApi;
    .end local v4           #customKey:Ljava/lang/String;
    .end local v5           #customSecrect:Ljava/lang/String;
    .end local v11           #initialValues:Landroid/content/ContentValues;
    .end local v12           #name:Ljava/lang/String;
    .end local v15           #response:Ljava/lang/String;
    .end local v16           #status:Z
    .end local v24           #tokenKey:Ljava/lang/String;
    .end local v25           #tokenSecrect:Ljava/lang/String;
    :pswitch_2
    :try_start_2
    new-instance v20, Lt4j/TBlog;

    invoke-direct/range {v20 .. v20}, Lt4j/TBlog;-><init>()V

    .line 423
    .local v20, tblog:Lt4j/TBlog;
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->neteaserequestToken:Lt4j/http/RequestToken;

    move-object/from16 v0, v20

    invoke-virtual {v0, v6}, Lt4j/TBlog;->getOAuthAccessToken(Lt4j/http/RequestToken;)Lt4j/http/AccessToken;

    move-result-object v9

    .line 424
    .local v9, accessToken:Lt4j/http/AccessToken;
    invoke-virtual {v9}, Lt4j/http/AccessToken;->getToken()Ljava/lang/String;

    move-result-object v24

    .line 425
    .restart local v24       #tokenKey:Ljava/lang/String;
    invoke-virtual {v9}, Lt4j/http/AccessToken;->getTokenSecret()Ljava/lang/String;

    move-result-object v25

    .line 426
    .restart local v25       #tokenSecrect:Ljava/lang/String;
    if-nez v24, :cond_9

    const-string v6, ""

    move-object/from16 v0, v24

    invoke-virtual {v6, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_9

    if-nez v25, :cond_9

    const-string v6, ""

    move-object/from16 v0, v25

    invoke-virtual {v6, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_a

    .line 428
    :cond_9
    move-object/from16 v0, v20

    move-object/from16 v1, v24

    move-object/from16 v2, v25

    invoke-virtual {v0, v1, v2}, Lt4j/TBlog;->setToken(Ljava/lang/String;Ljava/lang/String;)V

    .line 429
    invoke-virtual/range {v20 .. v20}, Lt4j/TBlog;->verifyCredentials()Lt4j/data/User;

    move-result-object v26

    .line 430
    .local v26, user:Lt4j/data/User;
    invoke-virtual/range {v26 .. v26}, Lt4j/data/User;->getName()Ljava/lang/String;

    move-result-object v12

    .line 431
    .restart local v12       #name:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "delete from oauth_list where oauth_type=\'netease\'"

    invoke-virtual {v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 433
    new-instance v11, Landroid/content/ContentValues;

    invoke-direct {v11}, Landroid/content/ContentValues;-><init>()V

    .line 434
    .restart local v11       #initialValues:Landroid/content/ContentValues;
    const-string v6, "oauth_type"

    const-string v7, "netease"

    invoke-virtual {v11, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 435
    const-string v6, "oauth_token"

    move-object/from16 v0, v24

    invoke-virtual {v11, v6, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 436
    const-string v6, "oauth_token_secret"

    move-object/from16 v0, v25

    invoke-virtual {v11, v6, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 437
    const-string v6, "oauth_name"

    invoke-virtual {v11, v6, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 438
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "oauth_list"

    const/4 v8, 0x0

    invoke-virtual {v6, v7, v8, v11}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J

    .line 440
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x1

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_2
    .catch Landroid/database/SQLException; {:try_start_2 .. :try_end_2} :catch_1
    .catch Lt4j/TBlogException; {:try_start_2 .. :try_end_2} :catch_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3

    goto/16 :goto_0

    .line 446
    .end local v9           #accessToken:Lt4j/http/AccessToken;
    .end local v11           #initialValues:Landroid/content/ContentValues;
    .end local v12           #name:Ljava/lang/String;
    .end local v20           #tblog:Lt4j/TBlog;
    .end local v24           #tokenKey:Ljava/lang/String;
    .end local v25           #tokenSecrect:Ljava/lang/String;
    .end local v26           #user:Lt4j/data/User;
    :catch_1
    move-exception v10

    .line 448
    .local v10, e:Landroid/database/SQLException;
    invoke-virtual {v10}, Landroid/database/SQLException;->printStackTrace()V

    .line 449
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    .line 443
    .end local v10           #e:Landroid/database/SQLException;
    .restart local v9       #accessToken:Lt4j/http/AccessToken;
    .restart local v20       #tblog:Lt4j/TBlog;
    .restart local v24       #tokenKey:Ljava/lang/String;
    .restart local v25       #tokenSecrect:Ljava/lang/String;
    :cond_a
    :try_start_3
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_3
    .catch Landroid/database/SQLException; {:try_start_3 .. :try_end_3} :catch_1
    .catch Lt4j/TBlogException; {:try_start_3 .. :try_end_3} :catch_2
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_3

    goto/16 :goto_0

    .line 450
    .end local v9           #accessToken:Lt4j/http/AccessToken;
    .end local v20           #tblog:Lt4j/TBlog;
    .end local v24           #tokenKey:Ljava/lang/String;
    .end local v25           #tokenSecrect:Ljava/lang/String;
    :catch_2
    move-exception v10

    .line 452
    .local v10, e:Lt4j/TBlogException;
    invoke-virtual {v10}, Lt4j/TBlogException;->printStackTrace()V

    .line 453
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    .line 454
    .end local v10           #e:Lt4j/TBlogException;
    :catch_3
    move-exception v10

    .line 456
    .local v10, e:Ljava/lang/Exception;
    invoke-virtual {v10}, Ljava/lang/Exception;->printStackTrace()V

    .line 457
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    .line 462
    .end local v10           #e:Ljava/lang/Exception;
    :pswitch_3
    const/4 v9, 0x0

    .line 464
    .local v9, accessToken:Ljava/lang/String;
    invoke-virtual/range {p1 .. p1}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Lcom/renren/api/connect/android/Util;->parseUrl(Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v27

    .line 465
    .local v27, values:Landroid/os/Bundle;
    invoke-static {}, Landroid/webkit/CookieSyncManager;->getInstance()Landroid/webkit/CookieSyncManager;

    move-result-object v6

    invoke-virtual {v6}, Landroid/webkit/CookieSyncManager;->sync()V

    .line 466
    const-string v6, "access_token"

    move-object/from16 v0, v27

    invoke-virtual {v0, v6}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 468
    if-eqz v9, :cond_d

    .line 471
    :try_start_4
    new-instance v6, Lcom/renren/api/connect/android/Renren;

    sget-object v7, Lcom/netease/newsreader/weibo/WeiboLogin;->RENREN_API_KEY:Ljava/lang/String;

    sget-object v8, Lcom/netease/newsreader/weibo/WeiboLogin;->RENREN_SECRET_KEY:Ljava/lang/String;

    sget-object v28, Lcom/netease/newsreader/weibo/WeiboLogin;->RENREN_APP_ID:Ljava/lang/String;

    move-object/from16 v0, v28

    move-object/from16 v1, p0

    invoke-direct {v6, v7, v8, v0, v1}, Lcom/renren/api/connect/android/Renren;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)V

    move-object/from16 v0, p0

    iput-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->mRenren:Lcom/renren/api/connect/android/Renren;

    .line 472
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->mRenren:Lcom/renren/api/connect/android/Renren;

    invoke-virtual {v6, v9}, Lcom/renren/api/connect/android/Renren;->updateAccessToken(Ljava/lang/String;)V

    .line 473
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->mRenren:Lcom/renren/api/connect/android/Renren;

    invoke-virtual {v6}, Lcom/renren/api/connect/android/Renren;->getAccessToken()Ljava/lang/String;

    move-result-object v24

    .line 474
    .restart local v24       #tokenKey:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->mRenren:Lcom/renren/api/connect/android/Renren;

    invoke-virtual {v6}, Lcom/renren/api/connect/android/Renren;->getAccessToken()Ljava/lang/String;

    move-result-object v25

    .line 475
    .restart local v25       #tokenSecrect:Ljava/lang/String;
    if-nez v24, :cond_b

    const-string v6, ""

    move-object/from16 v0, v24

    invoke-virtual {v6, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_b

    if-nez v25, :cond_b

    const-string v6, ""

    move-object/from16 v0, v25

    invoke-virtual {v6, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_c

    .line 479
    :cond_b
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "delete from oauth_list where oauth_type=\'renren\'"

    invoke-virtual {v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 481
    new-instance v11, Landroid/content/ContentValues;

    invoke-direct {v11}, Landroid/content/ContentValues;-><init>()V

    .line 482
    .restart local v11       #initialValues:Landroid/content/ContentValues;
    const-string v6, "oauth_type"

    const-string v7, "renren"

    invoke-virtual {v11, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 483
    const-string v6, "oauth_token"

    move-object/from16 v0, v24

    invoke-virtual {v11, v6, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 484
    const-string v6, "oauth_token_secret"

    move-object/from16 v0, v25

    invoke-virtual {v11, v6, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 485
    const-string v6, "oauth_name"

    const-string v7, ""

    invoke-virtual {v11, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 486
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v7, "oauth_list"

    const/4 v8, 0x0

    invoke-virtual {v6, v7, v8, v11}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J

    .line 488
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x1

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_4

    goto/16 :goto_0

    .line 494
    .end local v11           #initialValues:Landroid/content/ContentValues;
    .end local v24           #tokenKey:Ljava/lang/String;
    .end local v25           #tokenSecrect:Ljava/lang/String;
    :catch_4
    move-exception v10

    .line 495
    .restart local v10       #e:Ljava/lang/Exception;
    invoke-virtual {v10}, Ljava/lang/Exception;->printStackTrace()V

    .line 496
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->mRenren:Lcom/renren/api/connect/android/Renren;

    move-object/from16 v0, p0

    invoke-virtual {v6, v0}, Lcom/renren/api/connect/android/Renren;->logout(Landroid/content/Context;)Ljava/lang/String;

    .line 497
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    .line 491
    .end local v10           #e:Ljava/lang/Exception;
    .restart local v24       #tokenKey:Ljava/lang/String;
    .restart local v25       #tokenSecrect:Ljava/lang/String;
    :cond_c
    :try_start_5
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_4

    goto/16 :goto_0

    .line 500
    .end local v24           #tokenKey:Ljava/lang/String;
    .end local v25           #tokenSecrect:Ljava/lang/String;
    :cond_d
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->mRenren:Lcom/renren/api/connect/android/Renren;

    move-object/from16 v0, p0

    invoke-virtual {v6, v0}, Lcom/renren/api/connect/android/Renren;->logout(Landroid/content/Context;)Ljava/lang/String;

    .line 501
    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    .line 315
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method

.method private ydnoteLogin()V
    .locals 4

    .prologue
    .line 665
    :try_start_0
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 666
    const-string v2, "10.0.0.172"

    const/16 v3, 0x50

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/netease/newsreader/util/Tools;->setHttpProxy(Ljava/lang/String;Ljava/lang/String;)V

    .line 669
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->getYdnoteAuthorizeUrl()Ljava/lang/String;

    move-result-object v0

    .line 670
    .local v0, authorizedURL:Ljava/lang/String;
    if-eqz v0, :cond_1

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    if-lez v2, :cond_1

    .line 671
    iget-object v2, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v2, v0}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 677
    .end local v0           #authorizedURL:Ljava/lang/String;
    :cond_1
    :goto_0
    return-void

    .line 673
    :catch_0
    move-exception v1

    .line 674
    .local v1, e:Ljava/lang/Exception;
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    .line 675
    iget-object v2, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->handler:Landroid/os/Handler;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0
.end method


# virtual methods
.method public getRenrenAuthorizeUrl(Landroid/app/Activity;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 5
    .parameter "activity"
    .parameter "permissions"
    .parameter "redirectUrl"
    .parameter "responseType"
    .parameter "apiKey"

    .prologue
    .line 722
    invoke-static {p1}, Landroid/webkit/CookieSyncManager;->createInstance(Landroid/content/Context;)Landroid/webkit/CookieSyncManager;

    .line 724
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 725
    .local v0, params:Landroid/os/Bundle;
    const-string v3, "client_id"

    invoke-virtual {v0, v3, p5}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 726
    const-string v3, "redirect_uri"

    invoke-virtual {v0, v3, p3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 727
    const-string v3, "response_type"

    invoke-virtual {v0, v3, p4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 728
    const-string v3, "display"

    const-string v4, "touch"

    invoke-virtual {v0, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 731
    if-nez p2, :cond_0

    .line 732
    sget-object p2, Lcom/renren/api/connect/android/Renren;->DEFAULT_PERMISSIONS:[Ljava/lang/String;

    .line 735
    :cond_0
    if-eqz p2, :cond_1

    array-length v3, p2

    if-lez v3, :cond_1

    .line 736
    const-string v3, " "

    invoke-static {v3, p2}, Landroid/text/TextUtils;->join(Ljava/lang/CharSequence;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    .line 737
    .local v1, scope:Ljava/lang/String;
    const-string v3, "scope"

    invoke-virtual {v0, v3, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 740
    .end local v1           #scope:Ljava/lang/String;
    :cond_1
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "https://graph.renren.com/oauth/authorize?"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v0}, Lcom/renren/api/connect/android/Util;->encodeUrl(Landroid/os/Bundle;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 741
    .local v2, url:Ljava/lang/String;
    return-object v2
.end method

.method public getYdnoteAuthorizeUrl()Ljava/lang/String;
    .locals 6

    .prologue
    .line 687
    new-instance v3, Lcom/netease/newsreader/weibo/YdNoteLoginHelper;

    invoke-direct {v3}, Lcom/netease/newsreader/weibo/YdNoteLoginHelper;-><init>()V

    .line 689
    .local v3, ydHelper:Lcom/netease/newsreader/weibo/YdNoteLoginHelper;
    const/4 v0, 0x0

    .line 692
    .local v0, authorizedUrl:Ljava/lang/String;
    const/4 v4, 0x0

    :try_start_0
    iput-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustToken:Ljava/lang/String;

    .line 693
    const/4 v4, 0x0

    iput-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustsceset:Ljava/lang/String;

    .line 694
    invoke-virtual {v3}, Lcom/netease/newsreader/weibo/YdNoteLoginHelper;->requestToken()Ljava/util/Map;

    move-result-object v2

    .line 695
    .local v2, map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v4, "oauth_token"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    iput-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustToken:Ljava/lang/String;

    .line 696
    const-string v4, "oauth_token_secret"

    invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    iput-object v4, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->reqeustsceset:Ljava/lang/String;

    .line 699
    invoke-virtual {v3, v2}, Lcom/netease/newsreader/weibo/YdNoteLoginHelper;->authorizeToken(Ljava/util/Map;)Ljava/lang/String;

    move-result-object v0

    .line 700
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, "&display=mobile"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 706
    .end local v2           #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    :goto_0
    return-object v0

    .line 701
    :catch_0
    move-exception v1

    .line 703
    .local v1, e:Ljava/lang/Exception;
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public goBackClick(Landroid/view/View;)V
    .locals 0
    .parameter "view"

    .prologue
    .line 782
    invoke-virtual {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->finish()V

    .line 783
    return-void
.end method

.method public onApplyTheme()V
    .locals 3

    .prologue
    .line 787
    invoke-super {p0}, Lcom/netease/newsreader/activity/BaseActivity;->onApplyTheme()V

    .line 788
    invoke-virtual {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->getThemeSettingsHelper()Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v0

    .line 789
    .local v0, themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;
    const v1, 0x7f0c0007

    const v2, 0x7f0200fe

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/app/Activity;II)V

    .line 790
    const v1, 0x7f0c006f

    const v2, 0x7f020089

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setImageViewSrc(Landroid/app/Activity;II)V

    .line 791
    const v1, 0x7f0c0008

    const v2, 0x7f080025

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/app/Activity;II)V

    .line 792
    const v1, 0x7f0c0002

    const v2, 0x7f020041

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setImageViewSrc(Landroid/app/Activity;II)V

    .line 793
    return-void
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 8
    .parameter "savedInstanceState"

    .prologue
    const/4 v7, 0x2

    const/4 v6, 0x1

    const/4 v2, 0x0

    .line 87
    invoke-super {p0, p1}, Lcom/netease/newsreader/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 88
    invoke-virtual {p0, v6}, Lcom/netease/newsreader/weibo/WeiboLogin;->requestWindowFeature(I)Z

    .line 89
    const v1, 0x7f03007f

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/weibo/WeiboLogin;->setContentView(I)V

    .line 91
    invoke-virtual {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->getIntent()Landroid/content/Intent;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    .line 92
    .local v0, bundle:Landroid/os/Bundle;
    if-eqz v0, :cond_0

    .line 93
    const-string v1, "weibo_type"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    .line 98
    :cond_0
    const v1, 0x7f0c0015

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/weibo/WeiboLogin;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->loadingbar:Landroid/widget/LinearLayout;

    .line 99
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->loadingbar:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 100
    const v1, 0x7f0c0008

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/weibo/WeiboLogin;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->title:Landroid/widget/TextView;

    .line 102
    const v1, 0x7f0c018c

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/weibo/WeiboLogin;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/webkit/WebView;

    iput-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    .line 103
    invoke-virtual {p0}, Lcom/netease/newsreader/weibo/WeiboLogin;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Landroid/webkit/CookieSyncManager;->createInstance(Landroid/content/Context;)Landroid/webkit/CookieSyncManager;

    .line 104
    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object v1

    invoke-virtual {v1}, Landroid/webkit/CookieManager;->removeAllCookie()V

    .line 105
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    invoke-virtual {v1, v6}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 106
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    invoke-virtual {v1, v7}, Landroid/webkit/WebSettings;->setCacheMode(I)V

    .line 107
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    invoke-virtual {v1, v2}, Landroid/webkit/WebSettings;->setDatabaseEnabled(Z)V

    .line 108
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    invoke-virtual {v1, v2}, Landroid/webkit/WebSettings;->setSaveFormData(Z)V

    .line 109
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    invoke-virtual {v1, v2}, Landroid/webkit/WebSettings;->setSavePassword(Z)V

    .line 110
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1, v6}, Landroid/webkit/WebView;->clearCache(Z)V

    .line 111
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 112
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    const-string v2, "10.0.0.172"

    const-string v3, "80"

    const-string v4, ""

    const-string v5, ""

    invoke-virtual {v1, v2, v3, v4, v5}, Landroid/webkit/WebView;->setHttpAuthUsernamePassword(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 114
    :cond_1
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    new-instance v2, Lcom/netease/newsreader/weibo/WeiboLogin$WebHandler;

    invoke-direct {v2, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$WebHandler;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    const-string v3, "webhandler"

    invoke-virtual {v1, v2, v3}, Landroid/webkit/WebView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    .line 115
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->webView:Landroid/webkit/WebView;

    new-instance v2, Lcom/netease/newsreader/weibo/WeiboLogin$2;

    invoke-direct {v2, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$2;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 193
    iget v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    if-nez v1, :cond_3

    .line 194
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->title:Landroid/widget/TextView;

    const-string v2, " \u767b\u5f55\u65b0\u6d6a\u5fae\u535a "

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 195
    new-instance v1, Lcom/netease/newsreader/weibo/WeiboLogin$3;

    invoke-direct {v1, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$3;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    .line 199
    invoke-virtual {v1}, Lcom/netease/newsreader/weibo/WeiboLogin$3;->start()V

    .line 236
    :cond_2
    :goto_0
    new-instance v1, Landroid/app/ProgressDialog;

    invoke-direct {v1, p0}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->progressDialog:Landroid/app/ProgressDialog;

    .line 237
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->progressDialog:Landroid/app/ProgressDialog;

    const-string v2, "\u6b63\u5728\u5904\u7406\u5206\u4eab\u5e10\u53f7\u7ed1\u5b9a"

    invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    .line 238
    return-void

    .line 203
    :cond_3
    iget v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    if-ne v1, v6, :cond_4

    .line 204
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->title:Landroid/widget/TextView;

    const-string v2, " \u767b\u5f55\u817e\u8baf\u5fae\u535a"

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 205
    new-instance v1, Lcom/netease/newsreader/weibo/WeiboLogin$4;

    invoke-direct {v1, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$4;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    .line 209
    invoke-virtual {v1}, Lcom/netease/newsreader/weibo/WeiboLogin$4;->start()V

    goto :goto_0

    .line 212
    :cond_4
    iget v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    if-ne v1, v7, :cond_5

    .line 213
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->title:Landroid/widget/TextView;

    const-string v2, " \u767b\u5f55\u7f51\u6613\u5fae\u535a"

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 214
    new-instance v1, Lcom/netease/newsreader/weibo/WeiboLogin$5;

    invoke-direct {v1, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$5;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    .line 218
    invoke-virtual {v1}, Lcom/netease/newsreader/weibo/WeiboLogin$5;->start()V

    goto :goto_0

    .line 220
    :cond_5
    iget v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    const/4 v2, 0x3

    if-ne v1, v2, :cond_6

    .line 221
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->title:Landroid/widget/TextView;

    const-string v2, " \u767b\u5f55\u4eba\u4eba\u7f51"

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 222
    new-instance v1, Lcom/netease/newsreader/weibo/WeiboLogin$6;

    invoke-direct {v1, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$6;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    .line 226
    invoke-virtual {v1}, Lcom/netease/newsreader/weibo/WeiboLogin$6;->start()V

    goto :goto_0

    .line 227
    :cond_6
    iget v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->weibo_type:I

    const/4 v2, 0x4

    if-ne v1, v2, :cond_2

    .line 228
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin;->title:Landroid/widget/TextView;

    const-string v2, " \u767b\u5f55\u6709\u9053\u4e91\u7b14\u8bb0"

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 229
    new-instance v1, Lcom/netease/newsreader/weibo/WeiboLogin$7;

    invoke-direct {v1, p0}, Lcom/netease/newsreader/weibo/WeiboLogin$7;-><init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V

    .line 233
    invoke-virtual {v1}, Lcom/netease/newsreader/weibo/WeiboLogin$7;->start()V

    goto :goto_0
.end method
